package cn.zt.service.impl;

import cn.zt.common.Result;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.zt.domain.TProductDetails;
import cn.zt.service.TProductDetailsService;
import cn.zt.mapper.TProductDetailsMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author 21889
* @description 针对表【t_product_details(理财产品详细表)】的数据库操作Service实现
* @createDate 2024-09-03 19:18:05
*/
@Service
public class TProductDetailsServiceImpl extends ServiceImpl<TProductDetailsMapper, TProductDetails>
    implements TProductDetailsService{

    @Resource
    private TProductDetailsMapper productDetailsMapper;

    @Override
    public Result getOneDetails(String name) {
        TProductDetails productDetails = productDetailsMapper.selectOne(Wrappers.<TProductDetails>lambdaQuery()
                .eq(StringUtils.checkValNotNull(name), TProductDetails::getName, name));
        return Result.success(productDetails);
    }
}




